<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * Controlador para gerir a autenticação
 */
class Medico extends CI_Controller {
        public function __construct() {
            parent::__construct();
            if (!is_logged_in()){
                redirect("auth/login");
            } else if (!is_medico()){
                redirect("auth/forbidden");
            }
        }
	public function index(){
            redirect("medico/home");
        }
        public function home(){
            $content = $this->load->view("medico/home",'',true);
            
            
            $sidebar = array("menu"=>  get_menu("medico/home"));
            $this->load->view('common/header');
            $this->load->view('common/sidebar',$sidebar);
            $this->load->view('common/content', array("html"=>$content));
            $this->load->view('common/footer');
        }
}